package com.fengmi.mapper;

import com.fengmi.entity.MallGoodsSpecOptions;
import com.fengmi.entity.MallGoodsTemplate;
import com.fengmi.entity.ViewSpecOption;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * 作者：陈学虎
 * 时间：2021/7/8 0008 下午 7:27
 */
@Mapper
public interface MallGoodsSpecOptionsMapper {

    @Insert("insert into mall_goods_spec_options (option_name,spec_id) values (#{optionName} ,#{specId} )")
    int save(MallGoodsSpecOptions options);

    @Delete("delete from mall_goods_spec_options where spec_id = #{specId} ")
    int delBySpecId(Integer specId);

    //修改
    @Update("update mall_goods_spec_options set option_name = #{optionName} where id = #{optId} ")
    int updateOption(ViewSpecOption viewSpecOption);

    //删一个
    @Delete("delete from mall_goods_spec_options where id = #{optId} ")
    int delByOptId(int optId);
}
